/**
 * Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
 * Copyright (C) 2017-2019 THL A29 Limited, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * http://opensource.org/licenses/MIT
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */

@charset 'utf-8';
@import './variable.css';
@import './mixins/scroller.css';

.bk-table {
    width: 100%;
    max-width: 100%;
    text-align: left;
    border-bottom: 1px solid #e6e6e6;
    background-color: #fff;

    >thead,
    >tbody {
        >tr {

            >th,
            >td {
                height: 60px;
                line-height: 20px;
                vertical-align: middle;
                border-color: #E9EDF2;
                color: $fontColor;
                font-size: 14px;
                padding: 10px;
                border-top: 1px solid $borderLightColor;
            }
        }
    }

    >tfoot {
        border-top: 1px solid #ddd;
    }

    >thead>tr>th {
        background-color: #fafafa;
        vertical-align: bottom;
        border-bottom: 1px solid $borderLightColor;
        color: #666;
        font-size: 14px;
    }

    >caption+thead,
    >colgroup+thead,
    >thead:first-child {
        >tr:first-child {

            >th,
            >td {
                border-top: 0;
            }
        }
    }

    >tbody+tbody {
        border-top: 2px solid $borderLightColor;
    }

    &.has-thead-bordered {
        border: 1px solid $borderLightColor;

        >thead,
        >tbody,
        >tfoot {
            >tr {
                >th {
                    border: 1px solid $borderLightColor;
                    border-bottom: none;
                }
            }
        }
    }

    &.has-table-bordered {
        border: 1px solid $borderLightColor;

        >thead,
        >tbody {
            >tr {
                >td {
                    border: 1px solid $borderLightColor;
                }
            }
        }

        >thead,
        >tbody,
        >tfoot {
            >tr {
                >th {
                    border: 1px solid $borderLightColor;
                    border-bottom: none;
                }
            }
        }

        >thead>tr {

            >th,
            >td {
                border-bottom-width: 2px;
            }
        }
    }

    &.has-table-striped {
        >tbody>tr:nth-child(2n+2) {
            background-color: #fafafa;
        }
    }

    &.has-table-hover {
        >tbody>tr:hover {
            background-color: #f5f5f5;
        }
    }
}

.bk-table {
    border-top: none;

    .toggle-btn {
        font-size: 17px;
        color: #c3cdd7;
        cursor: pointer;

        &:hover {
            color: $primaryColor;
        }
    }

    .bk-button, .bk-text-button {
        vertical-align: middle;
    }
}

.bk-selector-create-item {
    cursor: pointer;
    height: 42px;
    line-height: 42px;
    font-size: 14px;
    background: #fafbfd;
    padding-left: 10px;
    border-top: 1px solid #e5e5e5;

    .text {
        font-style: normal;
        text-align: left;
        color: #737987;
    }
}

.bk-message-content {
    max-width: 580px;
    line-height: 20px;
    float: none;
    word-break: break-word;
}

.bk-table>thead>tr>th {
    background: none;
    color: #7b7d8a;
    height: 50px;
    vertical-align: middle;
}

.bk-table.has-table-hover>tbody>tr:hover {
    background-color: #fafbfd;
}

.bk-button {
    &.is-round {
        border-radius: 50px;
    }

    .bk-icon {
        position: relative;
        top: 1px;
    }
}

.bk-text-button {
    white-space: nowrap;

    &.is-disabled {
        color: #c3cdd7 !important;
    }
}

.bk-form .bk-label {
    font-weight: bold;
    color: #737987;
    padding-right: 20px;
}

.bk-tip-text {
    font-size: 12px;
    color: #c3cdd7;
    font-weight: normal;
}

.bk-button+.bk-button {
    margin-left: 5px;
}

.bk-button-group {
    .bk-button {
        margin-left: -1px !important;

        >a {
            display: block;
            color: #737987;
        }

        &.bk-primary {
            a {
                color: #fff;
            }
        }
    }
}

.bk-form-checkbox {
    color: $fontColor;
    margin-right: 0;
}

.bk-selector.open .bk-selector-icon {
    transform: rotate(180deg);
}

.bk-selector .bk-selector-list>ul::-webkit-scrollbar,
.textarea::-webkit-scrollbar {
    width: 4px;
    background-color: #fff;
}

.bk-selector {
    display: inline-block;

    &.is-danger {
        .bk-selector-input {
            border-color: #ff5656;
            background-color: #fff4f4;
            color: #ff5656;

            &:hover:not([disabled="disabled"])+.bk-icon {
                color: #ff5656;
            }
        }

        .bk-selector-icon {
            border-color: #ff5656;
            background-color: #fff4f4;
            color: #ff5656;
        }
    }
}

.bk-selector .bk-selector-list>ul::-webkit-scrollbar-thumb,
.textarea::-webkit-scrollbar-thumb {
    height: 5px;
    border-radius: 2px;
    background-color: #e6e9ea;
}

.bk-form-input[readonly],
.bk-form-password[readonly],
.bk-form-select[readonly],
.bk-form-textarea[readonly] {
    border-color: #c3cdd7 !important;
    background-color: #fafafa !important;
}

.bk-form-tip {
    &.is-danger {
        color: #ff5656;

        .bk-tip-text {
            color: #ff5656;
        }
    }
}

.bk-data-wrapper {
    border: 1px solid #c3cdd7;
    border-radius: 2px;
}

.bk-date input[name="date-select"] {
    border-radius: 2px;
}

.bk-dialog {
    /*z-index: 15000;*/
}

.bk-dialog-body {
    p {
        text-align: center;
    }
}

.bk-data-list {
    li {
        white-space: nowrap;
    }
}

.biz-badge {
    line-height: 18px !important;
}

.bk-button-group {
    &.bk-button-flex {
        width: 100%;

        .bk-button {
            flex: 1;
        }
    }
}

.bk-sideslider-closer {
    background-color: $primaryColor;
}

.bk-form-item {
    &.is-required {
        .bk-label {
            position: relative;
        }

        .bk-label:after {
            content: '*';
            color: #ff5656;
            position: absolute;
            margin: 3px -7px 0 2px;
            display: inline-block;
            vertical-align: middle;
            right: 18px;
        }
    }
}

.bk-form-inline-item {
    display: inline-block;
    vertical-align: top;

    &.is-required {
        .bk-label {
            position: relative;
        }

        .bk-label:after {
            content: '*';
            color: #ff5656;
            position: absolute;
            margin: 3px -7px 0 2px;
            display: inline-block;
            vertical-align: middle;
            right: 18px;
        }
    }
}

.bk-form-input-group {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    font-size: 0;

    .bk-number {
        min-width: 55px;
        border-radius: 2px 0 0 2px;
    }

    .bk-input-box {
        vertical-align: top;
    }

    .bk-form-input,
    .bk-form-password,
    .bk-form-select,
    .bk-form-textarea {
        border-radius: 2px 0 0 2px;
    }

    &.is-addon-left {
        .input-group-addon {
            border-left: 1px solid #c3cdd7;
            border-right: none;
            border-radius: 2px 0 0 2px;
        }

        .bk-form-input,
        .bk-form-password,
        .bk-form-select,
        .bk-number,
        .bk-form-textarea {
            border-radius: 0 2px 2px 0;
        }
    }

    .input-group-addon {
        min-width: 36px;
        height: 36px;
        text-align: center;
        line-height: 34px;
        display: inline-block;
        vertical-align: middle;
        background: #fafbfd;
        border: 1px solid #c3cdd7;
        color: #737987;
        font-size: 14px;
        border-left: none;
        border-radius: 0 2px 2px 0;
        padding: 0 7px;

        >.bk-icon {
            font-size: 18px;
            line-height: 34px;
        }

        .bk-selector-input {
            border: none;
            background-color: transparent;
        }
    }

    button:hover {
        background-color: $primaryColor;
        border-color: $primaryColor;
        color: #fff;
    }
}

.bk-dropdown-box {
    width: 130px;
    display: inline-block;
    vertical-align: middle;
}

.bk-dropdown-menu {
    .bk-dropdown-list {
        overflow: auto;

        >li {
            display: block !important;
        }

        .link {
            width: 100%;
            display: block;
            line-height: 41px;
            padding: 0 15px;
            color: #737987;
            font-size: 14px;
            text-decoration: none;
            white-space: nowrap;
            position: relative;
            border: 1px solid red;
            text-align: left;

            &:hover {
                background: #ebf4ff;
                color: #3c96ff;
            }
        }
    }

    .bk-dropdown-content {
        border: 1px solid $borderWeightColor;
    }
}

.bk-selector .bk-selector-list-item .text {
    display: block;
    text-align: left;
}

.bk-dropdown-menu .bk-dropdown-content {
    @mixin scroller;
    text-align: left;

    .dropdown-item {
        > a {
            vertical-align: middle;
        }
    }

    &.left-align {
        left: 0;
    }
}

.bk-form-textarea {
    line-height: 20px;
}

.bk-button .bk-icon+span {
    margin-right: 0;
}

.bk-sideslider-wrapper {
    @mixin scroller;
    top: 0;
}

.bk-selector .bk-selector-list {
    border: 1px solid #c3cdd7;
}

.bk-button {
    .biz-update-dot {
        width: 4px;
        height: 4px;
        display: inline-block;
        vertical-align: middle;
        background: #3c96ff;
        border-radius: 50%;
        margin-left: 10px;
        position: absolute;
        right: 8px;
        top: 16px;
    }

    &.bk-primary {
        .biz-update-dot {
            background: #fff;
        }
    }
}

.bk-sideslider {
    &.biz-app-container-tojson-sideslider {
        .bk-sideslider-wrapper {
            padding-bottom: 0;
        }
    }
}


.bk-data-list a:hover:after,
.bk-data-active a:after,
.bk-data-avatar {
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.bk-data-list a:hover:after,
.bk-data-active a:after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
}

.hidden {
    display: none;
}

.bk-data {
    position: absolute;
    left: 3px;
    top: 32px;
    /*width: 200px;*/
    background-color: #fafbfb;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    z-index: 999;
}

.bk-data-wrapper {
    position: relative;
    min-height: 33px;
    padding: 5px 5px 0 5px;
    border: 1px solid #ccc;
    font-family: 'Microsoft YaHei';
    cursor: text;
}

.bk-data-wrapper.active {
    border-color: #57a3f1;
}

.bk-data-cover {
    position: absolute;
    top: 0;
    left: 0;
    background-color: transparent;
    z-index: 9999;
}

.bk-data-wrapper.disabled {
    cursor: not-allowed;
    background-color: #eee;
}

.bk-data-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.bk-data-list a {
    position: relative;
    display: block;
    line-height: 30px;
    padding: 5px 35px 5px 15px;
    color: #333;
    text-decoration: none;
}

.bk-data-list a:hover {
    background-color: #f4f4f4;
}

.bk-data-active a {
    background-color: #f4f4f4;
}

.bk-data-avatar {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin-right: 15px;
    border: 1px solid #dcdcdc;
    border-radius: 50%;
    vertical-align: middle;
}

.bk-data-name em {
    font-style: normal;
    font-weight: bold;
    color: #E95B5F;
}

.bk-data-editor {
    min-height: 30px;
}

.bk-data-editor input[name="bk-data-input"] {
    min-width: 10px;
    width: 10px;
    height: 100%;
    font-size: 16px;
    outline: none;
    border: none;
}

.bk-data-item {
    display: inline-block;
    padding: 0 5px;
    margin: 2px 5px 5px;
    background-color: #fafafa;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    color: #2b2b2b;
}

.bk-data-highlight {
    font-style: normal;
    font-weight: bold;
    color: #E95B5F;
}

.biz-check-permission-loading,
.biz-app-loading,
.biz-node-loading,
.biz-namespace-loading {
    .bk-loading {
        background-color: transparent;
    }
}

.biz-app-list-wrapper {
    .bk-loading {
        margin-top: 107px;
    }
}

.bk-searcher-dropdown-list {
    .bk-loading {
        background-color: rgba(255, 255, 255, 1);
    }
}

.bk-dialog .bk-dialog-close {
    font-size: 12px;
}

.bk-form-checkbox input[type=checkbox][disabled] {
    border: 1px solid #ebf0f5;
    cursor: not-allowed;
    background-color: #fafbfd;
    background-position: 67px 13px;
}

.bk-form-checkbox input[type=checkbox][disabled]+.bk-checkbox-text {
    color: inherit;
}

.bk-form-checkbox input[type=checkbox]:checked[disabled] {
    border: none;
    color: inherit;
    background-color: transparent;
    background-position: -99px -62px;
}

.bk-resource-configmap {
    .bk-loading {
        background-color: #fff;
    }
}

.bk-resource-secret {
    .bk-loading {
        background-color: #fff;
    }
}

.bk-form-input[disabled],
.bk-form-password[disabled],
.bk-form-select[disabled],
.bk-form-textarea[disabled] {
    color: inherit;
}


.bk-dropdown-menu .bk-dropdown-content.is-show {
    overflow: visible;
}

.biz-templateset-wrapper {

    .bk-tooltip,
    .bk-tooltip-rel {
        width: 100% !important;
    }
}

.biz-back-btn {
    display: inline-block;
    height: 60px;
    line-height: 60px;
    font-size: 16px;
    margin-left: 20px;
    cursor: pointer;

    .back {
        font-size: 16px;
        font-weight: 700;
        position: relative;
        top: 1px;
        color: #3c96ff;
    }
}

.biz-monitor-dashboard-wrapper {
    .bk-loading {
        background-color: #fff;

        .bk-loading-wrapper {
            top: 30%;
        }
    }
}

.biz-app-instance-header {
    .bk-loading {
        background-color: rgba(255, 255, 255, 1);
    }
}

.bk-tooltips {
    z-index: 15000;
}

.bk-page .page-item.page-omit .page-button {
    background: transparent;
}

.bk-selector-list-item .bk-selector-node.is-disabled {
    background: #fff !important;
    color: #c3cdd7 !important;
}

.bk-exception {
    text-align: center;
    width: 400px;
    margin: 50px auto 0;

    .exception-text {
        font-size: 20px;
        color: #979797;
        margin: 32px 0;
        font-weight: normal;
    }

    &.bk-exception-center {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        -webkit-transform: translate(-50%, -50%);
        -o-transform: translate(-50%, -50%);
        -moz-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
        margin: 0;
    }
}

.bk-message-box {
    min-height: 130px;
    text-align: center;
    overflow-x: hidden;

    .message {
        font-size: 16px;
        color: #999;

        &.warning-message {
            margin-top: 60px;
            padding-top: 60px;
            background: url() no-repeat center top;
        }

        &.empty-message {
            margin-top: 50px;
        }

        &.loading-message {
            margin-top: 50px;
        }
    }
}

.bk-intro {
    color: #666666;
    border: 1px solid #c3cdd7;
    font-size: 12px;
    overflow: hidden;
    padding: 5px 10px;
    cursor: default;
    background: #f7f7f7;
    border-radius: 2px;
}

.bk-intro.bk-danger {
    color: #ff2323;
    border: #ffbcbc 1px solid;
    background: #fff;
}

.bk-selector .bk-selector-node .text {
    white-space: nowrap;
    word-break: break-all;
    text-overflow: ellipsis;
    overflow: hidden;
}

.bk-badge {
    vertical-align: middle;
}

.bk-panel-tag {
    background-color: #e2f6e7;
    font-size: 12px;
    color: #c3cdd7;
    border: 1px solid #c3cdd7;
    font-weight: 400;
    padding: 0px 5px;
    border-radius: 2px;
    margin-left: 5px;
    border: 1px solid #34d97b;
    color: #34d97b;
}


@define-mixin create-mark $color {
    border-color: $color $color transparent transparent;
}

@define-mixin create-mark-left $color {
    border-color: $color transparent transparent $color;
}

.bk-mark-corner {
    width: 46px;
    height: 46px;
    position: absolute;
    right: -2px;
    top: -2px;
    border-radius: 0px 2px 0 0;
    -o-border-radius: 0px 2px 0 0;
    -ms-border-radius: 0px 2px 0 0;
    -webkit-border-radius: 0px 2px 0 0;
    -moz-border-radius: 0px 2px 0 0;
    font-size: 12px;
    color: #fff;

    &:before {
        content: "";
        width: 0px;
        height: 0;
        border: 23px solid;
        position: absolute;
        left: 0;
        top: 0;
        @mixin create-mark $fnMinorColor;
    }

    p {
        margin: 0;
        transform: rotate(45deg);
        position: absolute;
        right: -6px;
        top: 7px;
        width: 40px;
        text-align: center;
        height: 16px;
        overflow: hidden;
    }

    &.bk-mark-left {
        left: -2px;
        border-radius: 2px 0 0 0;

        &:before {
            @mixin create-mark-left $fnMinorColor;
        }

        p {
            left: -6px;
            transform: rotate(-45deg);
        }

        &.bk-success {
            &:before {
                @mixin create-mark-left $successColor;
            }
        }

        &.bk-warning {
            &:before {
                @mixin create-mark-left $warningColor;
            }
        }

        &.bk-danger {
            &:before {
                @mixin create-mark-left $dangerColor;
            }
        }

        &.bk-primary {
            &:before {
                @mixin create-mark-left $primaryColor;
            }
        }
    }

    &.bk-success {
        &:before {
            @mixin create-mark $successColor;
        }
    }

    &.bk-warning {
        &:before {
            @mixin create-mark $warningColor;
        }
    }

    &.bk-danger {
        &:before {
            @mixin create-mark $dangerColor;
        }
    }

    &.bk-primary {
        &:before {
            @mixin create-mark $primaryColor;
        }
    }
}

.bk-mark-corner {
    p {
        transform: rotate(0);
        font-size: 14px;
        overflow: visible;
    }
}

.bk-tab2 .bk-panel-label {
    float: right;
    margin-left: 5px;
}

.bk-selector .bk-selector-node .text {
    white-space: nowrap !important;
    word-break: break-all !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    border-top: none !important;
}

.bk-icon-button.bk-primary.hover,
.bk-icon-button.bk-primary:hover {

    .bk-spin-loading.bk-spin-loading-primary .rotate,
    .bk-loading2.bk-spin-loading-primary .rotate {
        background: #fff !important;
    }
}

.bk-icon-button.bk-primary {
    background-color: #fff;
}

.bk-selector-icon {
    top: 14px;
}

.biz-metric-manage-create-sideslider {
    .bk-loading {
        margin-top: -60px;
        height: 105%;
    }
}

.bk-switcher.is-checked {
    background: #3c95ff;
}

.bk-switcher.bk-switcher-small {
    width: 32px;
    height: 18px;
    line-height: 22px;
}

.bk-switcher.bk-switcher-small:after {
    width: 16px;
    height: 16px;
    left: 1px;
    top: 1px;
}

.bk-switcher.bk-switcher-small.is-checked:after {
    left: 100%;
    top: 1px;
    margin-left: -17px;
}

.bk-tooltip-inner {
    white-space: normal;
    word-break: normal;
    word-wrap: break-word;
}

.batch-operate-dropdown {
    .is-show {
        z-index: 1234;
    }
    .bk-dropdown-list > li > a {
        &.disabled {
            color: #c3cdd7;
            cursor: not-allowed;
            background-color: inherit;
            &:hover {
                color: #c3cdd7;
                background-color: inherit;
            }
        }
    }
}

[class^="bk-icon"],
[class*="bk-icon"] {
    margin-top: -1px;
}

.bk-form-input-group .input-group-addon.is-left {
    margin-right: -1px;
    border-left: 1px solid #c3cdd7;
    border-radius: 2px 0 0 2px;
}

.bk-message .bk-message-icon .bk-icon {
    position: relative;
    top: -1px;
}

.bk-form-inline-item.is-required .bk-label:after,
.bk-form-item.is-required .bk-label:after {
    top: 0;
    margin-top: 12px;
}

.biz-app-container-log-sideslider {
    .bk-sideslider-wrapper {
        padding-bottom: 0;
    }
    .bk-sideslider-content {
        max-height: calc(100vh - 60px);
        height: calc(100% - 60px);
    }
}

.bk-tab2 .bk-tab2-head .bk-tab2-nav>.tab2-nav-item {
    max-width: 220px;
}
